<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The Yaf_View_Simple Class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="yaf-view-interface.setscriptpath.html">Yaf_View_Interface::setScriptPath</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="yaf-view-simple.assign.html">Yaf_View_Simple::assign</a></div>
 <div class="up"><a href="book.yaf.html">Yaf</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.yaf-view-simple" class="reference">

 <h1 class="title">The Yaf_View_Simple Class</h1>
 

 <div class="partintro"><p class="verinfo">(Yaf &gt;=1.0.0)</p>


  <div class="section" id="yaf-view-simple.intro">
   <h2 class="title">简介</h2>
   <p class="para">
     <strong class="classname">Yaf_View_Simple</strong> 这是Yaf内建的一个模板引擎，是个简单而快速的模板引擎，只支持PHP脚本
   </p>
  </div>


  <div class="section" id="yaf-view-simple.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">Yaf_View_Simple</strong>
     </span>
     
     <span class="oointerface">implements 
      <span class="interfacename"><a href="class.yaf-view-interface.html" class="interfacename">Yaf_View_Interface</a></span>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">protected</span>
      <var class="varname"><a href="class.yaf-view-simple.html#yaf-view-simple.props.tpl-vars">$<var class="varname">_tpl_vars</var></a></var>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">protected</span>
      <var class="varname"><a href="class.yaf-view-simple.html#yaf-view-simple.props.tpl-dir">$<var class="varname">_tpl_dir</var></a></var>
    ;</div>


    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="yaf-view-simple.assign.html" class="methodname">assign</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="yaf-view-simple.assignref.html" class="methodname">assignRef</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter reference">&$value</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="yaf-view-simple.clear.html" class="methodname">clear</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="yaf-view-simple.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$tempalte_dir</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="yaf-view-simple.display.html" class="methodname">display</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$tpl</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$tpl_vars</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="yaf-view-simple.eval.html" class="methodname">eval</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$tpl_content</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$tpl_vars</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="yaf-view-simple.get.html" class="methodname">__get</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="yaf-view-simple.getscriptpath.html" class="methodname">getScriptPath</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="yaf-view-simple.isset.html" class="methodname">__isset</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="yaf-view-simple.render.html" class="methodname">render</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$tpl</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$tpl_vars</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="yaf-view-simple.set.html" class="methodname">__set</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="yaf-view-simple.setscriptpath.html" class="methodname">setScriptPath</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$template_dir</code></span>
   )</div>

   }</div>


  </div>

  

  <div class="section" id="yaf-view-simple.props">
   <h2 class="title">属性</h2>
   <dl>

    
     <dt id="yaf-view-simple.props.tpl-vars"><var class="varname"><var class="varname">_tpl_vars</var></var></dt>

     <dd>

      <p class="para"/>
     </dd>

    
    
     <dt id="yaf-view-simple.props.tpl-dir"><var class="varname"><var class="varname">_tpl_dir</var></var></dt>

     <dd>

      <p class="para"/>
     </dd>

    
   </dl>

  </div>



 </div>

 





















































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="yaf-view-simple.assign.html">Yaf_View_Simple::assign</a> — 为视图引擎分配一个模板变量</li><li><a href="yaf-view-simple.assignref.html">Yaf_View_Simple::assignRef</a> — The assignRef purpose</li><li><a href="yaf-view-simple.clear.html">Yaf_View_Simple::clear</a> — Clear Assigned values</li><li><a href="yaf-view-simple.construct.html">Yaf_View_Simple::__construct</a> — Constructor of Yaf_View_Simple</li><li><a href="yaf-view-simple.display.html">Yaf_View_Simple::display</a> — 渲染一个视图模板, 并直接输出给请求端</li><li><a href="yaf-view-simple.eval.html">Yaf_View_Simple::eval</a> — 渲染模板</li><li><a href="yaf-view-simple.get.html">Yaf_View_Simple::__get</a> — 获取视图引擎的一个模板变量值</li><li><a href="yaf-view-simple.getscriptpath.html">Yaf_View_Simple::getScriptPath</a> — 获取模板目录</li><li><a href="yaf-view-simple.isset.html">Yaf_View_Simple::__isset</a> — The __isset purpose</li><li><a href="yaf-view-simple.render.html">Yaf_View_Simple::render</a> — 渲染模板</li><li><a href="yaf-view-simple.set.html">Yaf_View_Simple::__set</a> — 为视图引擎分配一个模板变量</li><li><a href="yaf-view-simple.setscriptpath.html">Yaf_View_Simple::setScriptPath</a> — 设置模板的目录</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="yaf-view-interface.setscriptpath.html">Yaf_View_Interface::setScriptPath</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="yaf-view-simple.assign.html">Yaf_View_Simple::assign</a></div>
 <div class="up"><a href="book.yaf.html">Yaf</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
